package com.scalefuture.gmemcached;

import java.util.ArrayList;
import java.io.Serializable;

/**
 * Command Object to save decode result
 *
 * @author <a href="mailto:dev@scalefuture.com">Steve Tzou</a>
 */
public class Command implements Serializable{
    private String cmd;
    private String key;
    private String flags;
    private int expire;
    private int data_length;
    private byte[] data;
    private boolean noreplay = false;
    private ArrayList args = new ArrayList();

    public Command() {
        expire = 0;
        data_length = 0;
    }

    public String getCmd() {
        return cmd;
    }

    public String getKey() {
        return key;
    }

    public String getFlags() {
        return flags;
    }

    public int getExpire() {
        return expire;
    }

    public int getData_length() {
        return data_length;
    }

    public void setCmd(String cmd) {
        this.cmd = cmd;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public void setFlags(String flags) {
        this.flags = flags;
    }

    public void setExpire(int expire) {
        this.expire = expire;
    }

    public void setData_length(int data_length) {
        this.data_length = data_length;
    }

    public boolean isNoreplay() {
        return noreplay;
    }

    public void setNoreplay(boolean noreplay) {
        this.noreplay = noreplay;
    }

    public ArrayList getArgs() {
        return args;
    }

    public void setArgs(ArrayList args) {
        this.args = args;
    }

    public void addArgs(Object o) {
        this.args.add(o);
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }
}
